package view;

import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 * 启动框
 * @ClassName:       StartView
 * @Description:     TODO
 * @author:          ljh
 * @version:         CMR--
 * @date:            2019年3月22日        下午3:26:23
 */
public class StartView extends JFrame implements ActionListener {

	private final JButton start = new JButton();
	private final JTextField name = new JTextField();
	private final JLabel nameLabel = new JLabel("请输入:");
	
	public StartView() {
		this.setTitle("startup 启动器");
		start.setText("开始");
		// 把窗口位置设置到屏幕的中心
		this.setLocationRelativeTo(null);
		this.setSize(240, 60);
		GridLayout layout = new GridLayout(1,3);
		this.setLayout(layout);
		this.add(nameLabel);
		this.add(name);
		this.add(start);
	}
	
	public void init() {
		start.addActionListener(this);
		this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		
	}

}
